<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片资源</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
<script type="text/javascript">
$(function(){
	$("input[name='uploadimg']").change(function(){
		if($(this).val()==""){
			alert("请选择一个图片文件再上传!");	
		}else{
			$("#upimgform1").submit();	
		}
	})
	$(".aimg a").each(function(index, element) {
        var t = $(this);
		t.click(function(){
			var path = $(this).attr("v");
			showimgfile(path);	
		})
    });
	function showimgfile(strpath){
		$.get(strpath, function(result){
			$("#imgfilelist").html(result);
		});
	}
	showimgfile($(".aimg a:first").attr("v"));

})
</script>
</head>

<body>
<input type="hidden" name="bcV" id="bcV" value="{$bcV}" /><!--重要隐藏域，勿动-->
<div class="container">
	<div class="container-left">
		<h2>图片预览</h2>
		<ul>
			<li>
				<h3>目录</h3>
				<span class="aimg">
					<volist name='showfooler' id='v'>
					<a v="{:U('showfile',array('fooler'=>$v))}">{$v}</a>
					</volist>
				</span>
			</li>
		</ul>
	</div>
	<div class="container-right" id="imgfilelist">
    	<a>{$img|default=''}</a>
	</div>
</div>
    <div class="uploadimgcontrool">
    	<form action="__ACTION__/submit/true/bakcontrool/{:I('get.bakcontrool')}" name="upimgform1" id="upimgform1" method="post" enctype="multipart/form-data">
    	<span>从本地选择一张图片：</span><input type="file" name="uploadimg" />
        </form>
    </div>
</body>
</html>
